
package com.dhcc.ws.webservice.client.weather;

/**
 * Please modify this class to meet your needs
 * This class is not complete
 */

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;

/**
 * This class was generated by Apache CXF 2.6.1
 * 2019-12-10T16:39:28.233+08:00
 * Generated source version: 2.6.1
 * 
 */
public final class WeatherInterface_WeatherServicePort_Client {

    private static final QName SERVICE_NAME = new QName("http://WebXml.com.cn/", "WeatherServiceService");

    private WeatherInterface_WeatherServicePort_Client() {
    }

    public static void main(String args[]) throws java.lang.Exception {
        URL wsdlURL = WeatherServiceService.WSDL_LOCATION;
        if (args.length > 0 && args[0] != null && !"".equals(args[0])) { 
            File wsdlFile = new File(args[0]);
            try {
                if (wsdlFile.exists()) {
                    wsdlURL = wsdlFile.toURI().toURL();
                } else {
                    wsdlURL = new URL(args[0]);
                }
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }
        }
      
        WeatherServiceService ss = new WeatherServiceService(wsdlURL, SERVICE_NAME);
        WeatherInterface port = ss.getWeatherServicePort();  
        // 添加basc 认证
        BindingProvider bp = (BindingProvider) port;
        bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "admin");
        bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "123456");
        {
        System.out.println("Invoking getCitys...");
        java.lang.String _getCitys_theProvice = "111";
        java.lang.String _getCitys__return = port.getCitys(_getCitys_theProvice);
        System.out.println("getCitys.result=" + _getCitys__return);


        }
//        {
//        System.out.println("Invoking getPros...");
//        com.dhcc.ws.webservice.client.weather.GetPro _getPros_parameters = null;
//        com.dhcc.ws.webservice.client.weather.ProResponse _getPros__return = port.getPros(_getPros_parameters);
//        System.out.println("getPros.result=" + _getPros__return);
//
//
//        }
//        {
//        System.out.println("Invoking getWeathers...");
//        java.lang.String _getWeathers_proviceName = "";
//        java.lang.String _getWeathers_cityName = "";
//        java.lang.String _getWeathers__return = port.getWeathers(_getWeathers_proviceName, _getWeathers_cityName);
//        System.out.println("getWeathers.result=" + _getWeathers__return);
//
//
//        }

        System.exit(0);
    }

}
